<tr data-identifier-hash="<%= @token.contract_address_hash %>">
  <td class="stakes-td">
  </td>
  <td>
    <%= if Application.get_env(:block_scout_web, :display_token_icons) do %>
      <% chain_id_for_token_icon = Application.get_env(:block_scout_web, :chain_id) %>
      <% address_hash = @token.contract_address_hash %>
      <%=
        render BlockScoutWeb.TokensView,
        "_token_icon.html",
        chain_id: chain_id_for_token_icon,
        address: Address.checksum(address_hash)
      %>
    <% end %>
  </td>
  <td class="stakes-td">
    <%= link(
          to: address_token_transfers_path(@conn, :index, to_string(@address.hash), to_string(@token.contract_address_hash)),
          class: "tile-title-lg",
          "data-test": "token_transfers_#{@token.contract_address_hash}"
      ) do %>
      <%= token_name(@token) %>
    <% end %>
  </td>
  <td class="stakes-td">
    <%= @token.type  %>
  </td>
  <td class="stakes-td">
    <%= format_according_to_decimals(@token_balance.value, @token.decimals)  %>
  </td>
  <td class="stakes-td">
    <%= @token.symbol %>
  </td>
  <td class="stakes-td">
    <p class="mb-0 col-md-6 text-right text-muted">
      <% token_price = @token.fiat_value %>
      <span data-selector="token-price" data-token-usd-value="<%= token_price %>"><%= ChainView.format_currency_value(token_price, "@") %></span>
    </p>
  </td>
  <td class="stakes-td">
    <%= if token_price && @token.decimals do %>
      <p class="mb-0 col-md-6 text-right">
        <span data-selector="token-balance-usd" data-usd-value="<%= Chain.balance_in_fiat(@token_balance, @token) %>"><%= ChainView.format_usd_value(Chain.balance_in_fiat(@token_balance, @token)) %></span>
      </p>
    <% end %>
  </td>
  <td class="stakes-td">
    <%= with {:ok, address} <- Chain.hash_to_address(@token.contract_address_hash) do
      render BlockScoutWeb.AddressView,
      "_link.html",
      address: address,
      contract: false,
      use_custom_tooltip: false,
      no_tooltip: true
    end
    %>
  </td>
</tr>
